export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['/admin/login'],
    routes: [
      // 首页
      { path: '/', redirect: '/home' },
      {
        path: '/home',
        name: 'home',
        icon: 'home',
        component: './Home/Home',
        authority: ['/admin/login']
      },


      //分类
      {
        path: '/setting/classify',
        name: 'classify',
        icon: 'home',
        authority: ['/admin/property/classify/list'],
        component:'./Classify/Classify'
      },
      {
        name: 'classifySecond',
        path: '/setting/classifySecond',
        authority: ['/admin/property/classify/child'],
        component:'./Classify/ClassifySecond',
        hideInMenu: true,
      },

      //标签
      {
        path: '/tab',
        name: 'tab',
        icon: 'home',
        authority: ['/admin/tab'],
        component:'./XOTab/Tab'
      },
      {
        name: 'tabAdd',
        path: '/tabAdd',
        component:'./XOTab/TabAdd',
        hideInMenu: true,
      },


      //新闻
      {
        name: 'news',
        path: '/news',
        icon: 'home',
        authority: ['/admin/system/nav/list'],
        component:'./News/News'
      },
      {
        name: 'newsAdd',
        path: '/newsAdd',
        component:'./News/NewsAdd',
        hideInMenu: true,
      },
      {
        name: 'newsInfo',
        path: '/newsInfo',
        component:'./News/NewsInfo',
        hideInMenu: true,
      },


      //轮播图
      {
        name: 'banner',
        path: '/setting/banner',
        icon: 'home',
        authority: ['/admin/system/nav/list'],
        component:'./Banner/Banner'
      },
      {
        name: 'bannerAdd',
        path: '/setting/bannerAdd',
        component:'./Banner/BannerAdd',
        hideInMenu: true,
      },
      {
        name: 'bannerInfo',
        path: '/setting/bannerInfo',
        component:'./Banner/BannerInfo',
        hideInMenu: true,
      },
      //敏感词汇
      {
        name: 'censorWords',
        path: '/setting/censorWords',
        icon: 'home',
        authority: ['/admin/system/censorWords/update'],
        component:'./CensorWords/CensorWords'
      },


      //修改密码
      {
        path: '/pwd',
        name: 'pwd',
        icon: 'home',
        hideInMenu: true,
        component:'./User/Pwd'
      },
      //permissions 权限
      {
        name:'permissions',
        path:'/permissions',
        icon: 'home',
        authority: ["/admin/permissions"],
        routes: [
          {
            name: 'app',
            path: '/permissions/app',
            authority: ["/admin/app/list"],
            component:'./Powers/Authorization/AppList'
          },
          {
            name: 'appAdd',
            path: '/permissions/appAdd',
            component:'./Powers/Authorization/AppAdd',
            hideInMenu: true,
          },
          {
            name: 'appEdit',
            path: '/permissions/appEdit',
            component:'./Powers/Authorization/AppAdd',
            hideInMenu: true,
          },
          {
            name: 'role',
            path: '/permissions/role',
            authority: ["/admin/app/list"],
            component:'./Powers/Role/Role'
          },
          {
            name: 'roleAdd',
            hideInMenu: true,
            path: '/permissions/roleAdd',
            component:'./Powers/Role/RoleAdd'
          },
          {
            name: 'roleEdit',
            path: '/permissions/roleEdit',
            hideInMenu: true,
            authority: ["/admin/app/list"],
            component:'./Powers/Role/RoleAdd'
          },
          {
            name: 'user',
            path: '/permissions/user',
            authority: ["/admin/app/list"],
            component:'./Powers/AdminUser/User'
          },
          {
            name: 'userAdd',
            hideInMenu: true,
            path: '/permissions/userAdd',
            component:'./Powers/AdminUser/UserAdd'
          },
          {
            name: 'userEdit',
            path: '/permissions/userEdit',
            hideInMenu: true,
            component:'./Powers/AdminUser/UserAdd'
          },
          {
            name: 'permissionAll',
            path: '/permissions/permission',
            authority: ["/admin/app/list"],
            component:'./Powers/Permission/Permission'
          },
          {
            name: 'permissionsAdd',
            hideInMenu: true,
            path: '/permissions/permissionAdd',
            component:'./Powers/Permission/PermissionAdd'
          },
          {
            name: 'permissionsEdit',
            path: '/permissions/permissionEdit',
            hideInMenu: true,
            component:'./Powers/Permission/PermissionAdd'
          },
        ]
      },
      {
        name: 'exception',
        icon: 'warning',
        path: '/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
